package net.borlis.sample.services.facade.ws.request;

import net.borlis.sample.service.entities.general.TravelDurationEntity;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Created by alexander.borlis on 14.08.2014.
 */
@XmlRootElement
public class TravelDurationRequest {

    private Integer from;
    private Integer to;

    public TravelDurationRequest() {
    }

    public TravelDurationRequest(Integer from, Integer to) {
        this.from = from;
        this.to = to;
    }

    public TravelDurationRequest(TravelDurationEntity travelDuration) {
        this.from = travelDuration.getDurationFrom();
        this.to = travelDuration.getDurationTo();
    }

    @XmlElement
    public Integer getFrom() {
        return from;
    }

    public void setFrom(Integer from) {
        this.from = from;
    }

    @XmlElement
    public Integer getTo() {
        return to;
    }

    public void setTo(Integer to) {
        this.to = to;
    }
}
